# _*_ coding: utf-8 _*_
# @Time : 2024-01-20 19:11
# @Author : wf
# 安装 ： pip install requests

import requests

url = 'https://www.baidu.com/s?'

# 路径编码
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'}

data = {
    'wd': '北京',
}
response = requests.get(url, params=data, headers=headers)

response.encoding = 'utf-8'
print(response.text)
